<html>
<head>
<title>
</title>
<style type="text/css">
</style>
<Script type="text/javascript">
var length = prompt ("How many characters do you want your password to be?");
length = parseInt(length);
var number_flag = confirm ("Would you like the password to include numbers?");
var numbers = "1234567890";
var lowerCase = "abcdefghijklmnopqrstuvwxyz";
var upperCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var possibleChars = "";
if (number_flag == true) {
possibleChars = possibleChars + numbers;
}
var y = possibleChars.length;
var password = [];
var i = 0;
while(i<length){
password [i]= possibleChars.charAt(Math.floor(Math.random() * y));
i++;
}
password=password.join ("");
alert("Your password is " + password + </br>);
</Script>
</head>
<body>
</body>
</html>